<% @title="User Registration" %>
<%= error_messages_for "user" %>
<% form_for :user do |form| %>
  <div class="item">
    <span class="label"><%= L10n :first_name %></span>
    <%= form.text_field :first_name, :size => User::NAME_SIZE, :maxlength => User::NAME_MAX_LENGTH %>
  </div>
  <div class="item">
    <span class="label">Family name:</span>
    <%= form.text_field :family_name,       
      :size => User::NAME_SIZE,
      :maxlength => User::NAME_MAX_LENGTH %>
  </div>
  <div class="item">    
    <span class="label">Birth date:</span>
    <%= form.date_select :birth_date %>
  </div>
  <div class="item">    
    <span class="label">Email:</span>
    <%= form.text_field :email,       
      :size => User::EMAIL_SIZE,
      :maxlength => User::EMAIL_MAX_LENGTH %>
  </div>
  <div class="item">    
    <span class="label">Password:</span>
    <%= form.password_field :password,       
      :size => User::PASSWORD_SIZE,
      :maxlength => User::PASSWORD_MAX_LENGTH %>
  </div>
  <div class="item">
    <span class="label">Confirm:</span>
    <%= form.password_field :password_confirmation,       
      :size => User::PASSWORD_SIZE,
      :maxlength => User::PASSWORD_MAX_LENGTH %>
  </div>
 <% for user_role_type in [:player, :fan, :coach, :organizer] %>
    <div class="item">
      <span class="label"><%= user_role_type %></span> 
      <%= check_box :user_roles, user_role_type %>
    </div>
 <% end %> 
 <%= submit_tag "Register!", :class => "submit" %>
<% end %>
